package webshop.beans;

import java.util.ArrayList;
import java.util.List;

import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;

import database.entity.ItemGroup;
import database.entity.UserGroup;
import database.entitymanager.ItemGroupManager;
import database.entitymanager.UserGroupManager;

public class ItemGroupBean extends ItemGroup{
	
	private ItemGroupBean selectedItemGroup;
		
	public ItemGroupBean() {
		super();
	}

	public ItemGroupBean getSelectedItemGroup() {
		return selectedItemGroup;
	}

	public void setSelectedItemGroup(ItemGroupBean selectedItemGroup) {
		this.selectedItemGroup = selectedItemGroup;
	}

	public List<ItemGroup> getAllItemGroups(){		
/*		List<ItemGroup> ret=new ArrayList<ItemGroup>();
		
		ret.add(new ItemGroup(1,"Računari",0));
		ret.add(new ItemGroup(2,"Računari",0));
		ret.add(new ItemGroup(3,"Monitori",0));
		ret.add(new ItemGroup(4,"Računari",0));
		ret.add(new ItemGroup(5,"Računari",0));
		ret.add(new ItemGroup(6,"Računari",0));
		
		return ret;
*/		ItemGroupManager m=new ItemGroupManager();
		return m.findItemGroupEntities();		

	}
		
}